View Issue Details

IDProjectCategoryView StatusLast Update
0001642K18X001.00 SKB SWANSWpublic2023-02-07 16:29
Reporter(ALTech) Sangmin Choi Assigned To(SW) Jason LingDue Date2023-02-08 15:33
PrioritynormalSeveritys4-minorReproducibilityN/A
Status closedResolutionfixed 
Summary0001642: Please apply this patch from BPM-1369.
DescriptionHi, Jason,

Please apply this patch from BPM-1369.

Commit Message
[BPM-1369] vsi latest binaries

syna-release/ampsdk
MMCEI-10005_1020_2.patch

syna-release/fw_enc
BPM-1369_fw_enc.zip

Thank you.
TagsNo tags attached.
Attach Tags

Users monitoring this issue

User List (SW) Dean Chiang , (SW) Jim Chen

Activities

(ALTech) Sangmin Choi

2023-02-07 14:38

developer  

MMCEI-10005_1020_2.patch (5,012 bytes)   
diff --git a/amp/src/ddl/comp_clk/include/clk_avsync.h b/amp/src/ddl/comp_clk/include/clk_avsync.h
index 0b4471e..3159322 100755
--- a/amp/src/ddl/comp_clk/include/clk_avsync.h
+++ b/amp/src/ddl/comp_clk/include/clk_avsync.h
@@ -261,6 +261,7 @@ typedef struct avsync_mgr_t {
     UINT            m_uiBufTimeCnt;     // Buffering time counter
     UINT            m_uiBufTimeThresh;  // Threshold for bufferred time of all streams
     UINT            m_uiStartTimeThresh;// Threshold for buffering time before kick off
+    UINT32          m_uiReadyWaitTime;  // Waiting time after one stream is ready
 
     UINT64          m_uiStartPTS;       // Start PTS for streams
     UINT64          m_uiStopPTS;        // Stop PTS for streams
diff --git a/amp/src/ddl/comp_clk/source/clk_avsync.c b/amp/src/ddl/comp_clk/source/clk_avsync.c
index f299de8..4cf5475 100755
--- a/amp/src/ddl/comp_clk/source/clk_avsync.c
+++ b/amp/src/ddl/comp_clk/source/clk_avsync.c
@@ -1272,6 +1272,7 @@ VOID file_playback_get_stream_info(AVSYNC_MGR *pSyncMgr)
 
                 if (pStream->m_uiBuffedTime > pStream->m_uiBufTimeThresh) {
                     pStream->m_fReady = TRUE;
+                    pSyncMgr->m_uiReadyWaitTime += pSyncMgr->m_uiStcCnt4 >> 2;
                 } else {
                     pStream->m_fReady = FALSE;
                     if (IS_PTS_VALID64(pSyncMgr->m_uiTimeFirstSample) &&
@@ -1286,6 +1287,12 @@ VOID file_playback_get_stream_info(AVSYNC_MGR *pSyncMgr)
                 }
                 pStream->m_uiPrevInput = pStream->m_uiInput;
 
+                AVSM("Type[%d] Input[%d] WaitInput[%d] ReadyWait[%d] Ready[%d] Underflow[%d] "
+                    "EosRcvd[%d] Ended[%d] m_uiFCnt[%d] ResyncPending[%d]\n",
+                    pStream->m_eType, pStream->m_uiInput, pStream->m_uiWaitInput,
+                    pSyncMgr->m_uiReadyWaitTime, pStream->m_fReady,
+                    pStream->m_fUnderflow, pStream->m_fEosRcvd, pStream->m_fEnded,
+                    pStream->m_uiFCnt, pStream->m_fResyncPending);
                 if (pStream->m_eType == STREAM_TYPE_VIDEO) {
                     uiMinV = uiNextPTS;
 
@@ -1367,18 +1374,27 @@ VOID file_playback_get_stream_info(AVSYNC_MGR *pSyncMgr)
     }
 
     if (pSyncMgr->m_eSyncStatus == SYNC_INIT) {
+        const INT8* cond = NULL;
         if (pSyncMgr->m_uiNumAStreams > 0 && !bAudEosRcvd && !bAudReady) {
             pSyncMgr->m_fAllStreamsReady = FALSE;
         }
+        AVSM("MinPCR[0x%x(%d)], BufTimeCnt[0x%x], BufTimeThresh[0x%x], NumStreams[%d],
+            StreamsReady[%d], StreamsEnded[%d]",
+            (INT32)pSyncMgr->m_uiMinPCR, IS_PTS_VALID64(pSyncMgr->m_uiMinPCR),
+            pSyncMgr->m_uiBufTimeCnt, pSyncMgr->m_uiBufTimeThresh, pSyncMgr->m_uiNumStreams,
+            pSyncMgr->m_fAllStreamsReady, pSyncMgr->m_fAllStreamsEnded);
         if (IS_PTS_VALID64(pSyncMgr->m_uiMinPCR) &&
             pSyncMgr->m_uiBufTimeCnt == 0) {
+            cond = "PCR";
             pSyncMgr->m_uiStartSTC = GET_PTS_VAL64(pSyncMgr->m_uiMinPCR);
             pSyncMgr->m_uiBufTimeCnt += pSyncMgr->m_uiStcCnt4 >> 2;
             if (pSyncMgr->m_uiBufTimeCnt > pSyncMgr->m_uiStartTimeThresh) {
                 SET_PTS_VALID64(pSyncMgr->m_uiStartSTC);
+                AVSH("Got and Valid start STC: 0x%llX from %s\n", pSyncMgr->m_uiStartSTC, cond);
             }
         } else {
             if (pSyncMgr->m_uiNumVStreams == 0) {
+                cond = "A_PTS";
                 pSyncMgr->m_uiMinPTS = uiMinA;
                 pSyncMgr->m_uiStartSTC = IS_PTS_VALID64(uiMinA) ?
                     GET_PTS_VAL64(uiMinA) : 0;
@@ -1387,6 +1403,12 @@ VOID file_playback_get_stream_info(AVSYNC_MGR *pSyncMgr)
                 pSyncMgr->m_uiStartSTC = IS_PTS_VALID64(uiMinV) ?
                     GET_PTS_VAL64(uiMinV) : IS_PTS_VALID64(uiMinA) ?
                     GET_PTS_VAL64(uiMinA) : 0;
+                cond = IS_PTS_VALID64(uiMinV) ? "V_PTS": IS_PTS_VALID64(uiMinA) ? "A_PTS": " ";
+                if (pSyncMgr->m_uiNumVStreams && pSyncMgr->m_uiNumAStreams) {
+                    if (pSyncMgr->m_uiReadyWaitTime > 90000) {
+                        pSyncMgr->m_fAllStreamsReady = TRUE;
+                    }
+                }
                 /*if (pSyncMgr->m_uiNumAStreams > 0 &&
                     IS_PTS_VALID64(uiMinA) && IS_PTS_VALID64(uiMinV) &&
                     check_pts_range(uiMinA, uiMinV, 900000, 0, FALSE) ==
@@ -1400,7 +1422,9 @@ VOID file_playback_get_stream_info(AVSYNC_MGR *pSyncMgr)
                 pSyncMgr->m_uiBufTimeCnt += pSyncMgr->m_uiStcCnt4 >> 2;
                 if (pSyncMgr->m_uiBufTimeCnt > pSyncMgr->m_uiBufTimeThresh) {
                     SET_PTS_VALID64(pSyncMgr->m_uiStartSTC);
-                    AVSH("Got and Valid start STC: 0x%llX\n", pSyncMgr->m_uiStartSTC);
+                    AVSH("Got and Valid start STC: 0x%llX from %s\n", pSyncMgr->m_uiStartSTC, cond);
+
+                    pSyncMgr->m_uiReadyWaitTime = 0;
                 }
             }
         }
MMCEI-10005_1020_2.patch (5,012 bytes)   
BPM-1369_fw_enc.zip (695,390 bytes)

(SW) Jim Chen

2023-02-07 15:59

developer   ~0012044

Hi Mr Sangmin,
they are pushed to branch 536.
2023-02-07 15:57:22 | jim.jm.chen@fii-fo.. | a4a4561 | syna-release/fw_enc | [BPM-1369] vsi latest binaries [2/2]
2023-02-07 15:50:58 | jim.jm.chen@fii-fo.. | 57cba60 | syna-release/ampsdk | [BPM-1369] vsi latest binaries [1/2]

(ALTech) Sangmin Choi

2023-02-07 16:28

developer   ~0012046

Hi, Jim,

Thank you always.

Issue History

Date Modified Username Field Change
2023-02-07 14:38 (ALTech) Sangmin Choi New Issue
2023-02-07 14:38 (ALTech) Sangmin Choi Status new => assigned
2023-02-07 14:38 (ALTech) Sangmin Choi Assigned To => (SW) Jason Ling
2023-02-07 14:38 (ALTech) Sangmin Choi File Added: MMCEI-10005_1020_2.patch
2023-02-07 14:38 (ALTech) Sangmin Choi File Added: BPM-1369_fw_enc.zip
2023-02-07 14:38 (ALTech) Sangmin Choi Issue Monitored: (SW) Jim Chen
2023-02-07 14:38 (ALTech) Sangmin Choi Issue Monitored: (SW) Dean Chiang
2023-02-07 15:59 (SW) Jim Chen Note Added: 0012044
2023-02-07 16:28 (ALTech) Sangmin Choi Note Added: 0012046
2023-02-07 16:29 (ALTech) Sangmin Choi Status assigned => closed
2023-02-07 16:29 (ALTech) Sangmin Choi Resolution open => fixed